from pyspark.ml.linalg import Vectors,Vector
if __name__ == '__main__':
    vector=Vectors.dense(2.0,0.0,8.0)
    vector=Vectors.sparse(3,[(0,2),(2.0,8.0)])